<!-- --------算力订单--------- -->
<template>
	<view class="ddxq">
		<view class="ddxq_t">
			<view class="title">{{ detail.project }}</view>
			<view class="moneyContent">
				<view class="moneyContent_l">
					<view class="money">价值：{{ detail.sumprice }} USDT</view>
				</view>
				<view class="num">×{{ detail.num }}</view>
			</view>
		</view>
		<view class="list">
			<view class="item">
				<view>矿机编号</view>
				<view class="right">{{ detail.kjbh }}</view>
			</view>
			<view class="item">
				<view>购买时间</view>
				<view class="right">
					{{ detail.addtime && formatDate(detail.addtime * 1000, "Y-M-D h:m") }}
				</view>
			</view>
			<view class="item">
				<view>主机数量</view>
				<view class="right">{{ detail.num }}份</view>
			</view>
			<view class="item">
				<view>上架时间</view>
				<view class="right">
					{{ formatDate(detail.start_ck_time * 1000, "Y-M-D h:m") }}
				</view>
			</view>
			<view class="item">
				<view>累计收益</view>
				<view class="right">
					{{ detail.money_have }}
				</view>
			</view>
			<view class="item" :style="{ border: `none` }">
				<view>当前状态</view>
				<view class="right">{{ detail.status_txt }}</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { formatDate } from "@/static/utils";
	export default {
		data() {
			return {
				detail: {},
			};
		},
		onLoad({ id }) {
			this.$request.get("/Home/Info/wakuang", { id }).then(({ data }) => {
				this.detail = data;
			});
		},
		methods: {
			formatDate,
		},
	};
</script>

<style lang="scss">
	.ddxq {
		padding: 30rpx 30rpx 0;
		.ddxq_t {
			width: 100%;
			background: #ffffff;
			border-radius: 10rpx;
			padding: 30rpx 20rpx;
			box-sizing: border-box;
			font-size: 32rpx;
			font-family: Alibaba PuHuiTi;
			font-weight: 400;
			color: #1a1a1a;
			margin-bottom: 20rpx;
			.title {
				margin-bottom: 30rpx;
			}

			.moneyContent {
				display: flex;
				justify-content: space-between;
				align-items: center;

				.moneyContent_l {
					display: flex;
					flex-direction: row;
					align-items: center;
					.money {
						font-size: 24rpx;
					}

					.rmb {
						color: #ff3608;
					}
				}

				.num {
					font-size: 24rpx;
					font-weight: 400;
					color: #1b1b1b;
				}
			}
		}
	}

	.list {
		width: 100%;
		border-radius: 10rpx;
		margin: auto;
		padding: 0 20rpx;
		box-sizing: border-box;
		background: #ffffff;

		.item {
			display: flex;
			justify-content: space-between;
			align-items: center;
			font-size: 30rpx;
			font-family: Alibaba PuHuiTi;
			font-weight: 400;
			color: #333333;
			padding: 30rpx 0;
			box-sizing: border-box;
			border-bottom: 1rpx solid #eee;

			.right {
				font-size: 24rpx;
				text-align: right;
			}
		}
	}
</style>
